import http from "@/http/index"


export default {

    add: {
        name: "添加地址",
        url: "/api/address/add",
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
    getList: {
        name: "地址列表",
        url: "/api/address/list",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    updateDefault: {
        name: "更改默认地址",
        url: "/api/address/updateDefault",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    update: {
        name: "编辑地址",
        url: "/api/address/update",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    select: {
        name: "获取地址",
        url: "/api/address/list",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    delete: {
        name: "删除地址",
        url: "/api/address/del",
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },
    
}
